package cn.basic.social.demo.exception;

public class BusinessException extends RuntimeException {

    private final Integer code;

    public BusinessException(String message, Integer code) {
        super(message);
        this.code = code;
    }

    public BusinessException(String message) {
        super(message);
        this.code = -1;
    }

    public Integer getCode() {
        return code;
    }
}
